]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Clear the request if user verifier connection is closed
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 17 Sep 2025 17:04:46 +0000 (19:04 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 2 Feb 2026 14:48:15 +0000 (14:48 +0000)
Similarly to previous commit, in case the user verifier connection is
closed we should just clear the user verifier instance, since starting
from this point is going to be just invalid.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3885>

js/gdm/util.js

index f762b79ec220f5d9a7d2785093924e7938c3b3a6..3334d61f0e8b74e27eb8edb69ac45568c7fdca3b 100644 (file)
@@ -200,6 +200,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
     _clearUserVerifier() {
         if (this._userVerifier) {
             this._disconnectSignals();
+            this._userVerifier.get_connection().disconnectObject(this);
             this._userVerifier.run_dispose();
             this._userVerifier = null;
             if (this._userVerifierChoiceList) {
@@ -506,6 +507,8 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             this._clearUserVerifier();
             this._userVerifier = await this._client.open_reauthentication_channel(
                 userName, this._cancellable);
+            this._userVerifier.get_connection().connectObject('closed',
+                () => this.clear(), this);
         } catch (e) {
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
                 return;
@@ -538,6 +541,8 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             this._clearUserVerifier();
             this._userVerifier =
                 await this._client.get_user_verifier(this._cancellable);
+            this._userVerifier.get_connection().connectObject('closed',
+                () => this.clear(), this);
         } catch (e) {
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
                 return;